<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>同期销售数据统计</title>
<style type="text/css">
<!--
.STYLE1 {
	color: #FF0000;
	font-weight: bold;
}
.red,.red td{color:red !important;}
-->
</style>
<body class="withvernav">
<style type="text/css">
	thead tr td{
		vertical-align: middle ; text-align: center;
	}
	.stdtable tbody tr td {padding:3px 0px !important;}
</style>
<div class="bodywrapper"> {{include file='/public/leftmenu.tpl'}}
  <div class="centercontent">
    <div class="pageheader notab">
      <h1 class="pagetitle">同比去年销售统计<span class="pagedesc" style="font-size:14px;">(新平台只统计直发订单)</span></h1>
     
</div>
<!--pageheader-->
    
    <div id="contentwrapper" class="contentwrapper" >
      <div id="basicform" class="subcontent">
          <!--搜索栏-->
<div class="page" style="display:none;">{{$pageList}} 计{{$datatotal}}条记录，共{{$totalpage}}页</div>
    <form class="stdform stdform2" method="get" action="?">
      <div class="tableoptions" style="padding-bottom:2px;padding-left:12px;">
      开始时间：
       <input type="text"  name="starttime" id="starttime" value="{{$starttime}}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
                  -
                  <input type="text"  name="endtime" value="{{$endtime}}" id="endtime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
       <span id="search_list">{{$shopname|getstr:48:0}}</span>
       <input name="shopname" id="shopname" type="hidden" value="{{$shopname}}" />
       <span id="choose_shop_btn" style="border:1px solid #ccc;padding:6px 5px 7px;border-radius:3px;cursor:pointer;" onClick="getShopList()">选择店铺 <img src="/fuman/images/search_down.png" width="14" height="21" align="absmiddle" style="margin-bottom:-4px;"></span>
        <button class="btn btn_orange btn_search radius50">Search</button>
{{if $list[0] neq  ''}}&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
<span class="page" style="background-color#fff;border:none;"><a href="javascript:exportExl();">导出结果到Excel</a></span>
{{/if}}
      </div>
    </form>
    <!--搜索栏结束-->
             <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
          
            <thead>
              <tr valign="top" class="tableheader">
                <td style=" vertical-align: middle;background-color: #CCCCCC; border: 1px solid #000000; text-align: center;">NO.</td>
                <td style=" vertical-align: middle;background-color: #CCCCCC; border: 1px solid #000000; text-align: center;">店铺</td>
                <td style=" vertical-align: middle;background-color: #CCCCCC; border: 1px solid #000000; text-align: center;">订单量(新平台/上年度马帮)</td>
                <td style=" vertical-align: middle;background-color: #CCCCCC; border: 1px solid #000000; text-align: center;">销售额(新平台/上年度马帮)</td>
                <td style=" vertical-align: middle;background-color: #CCCCCC; border: 1px solid #000000; text-align: center;">相差销售额</td>
              </tr>
            </thead>
          
             {{foreach from=$list item=res key=key}}
             <tr>
               <td class="head1" align="center">{{$key+1}}</td>
              <td class="head1" align="center">{{$res.shopname}}{{if $delshops[$res.shopname]['del_flag']==1}}<strong>(已删除)</strong>{{/if}}</td>
                <td class="head1" align="center">{{$res.orderNum}} <strong style="color:red;">/</strong> {{$mabangsells[$res.shopname]['ORDERNUM']}}</td>
               <td class="head1" align="center">{{$res.subtotal}}  <strong style="color:red;">/</strong> {{$mabangsells[$res.shopname]['INALL']}}</td>
               <td class="head1" align="center">{{$res.diff_money}}</td>
               </tr>
            {{/foreach}}
             <tr>
               <td align="center" class="head1"><strong>合计：</strong></td>
               <td align="center" class="head1">&nbsp;</td>
               <td align="center" class="head1"><span class="STYLE1">{{$totalinfo['ordernum']}} / {{$totalinfo['mb_ordernum']}}</span></td>
               <td align="center" class="head1" ><span class="STYLE1">{{$totalinfo['total']}} / {{$totalinfo['mb_total']}}</span></td>
               <td align="center" class="head1" ><span class="STYLE1">{{$totalinfo['diff_money']}}</span></td>
               </tr>
          </table>
      </div>
      </div>
<div style="position:absolute;z-index:999;top:105px;border:1px solid #666;left:220px;width:870px;background:#f5f5f5;padding:6px 10px;height:450px;margin-bottom:40px;display:none;" id="ajax_box">
<div style="padding-top:8px;padding-left:12px;height:28px;"><h4 style="float:left">选择要搜索的店铺</h4><span style="float:right">
  <input type="button" name="button" id="button" onClick="setShopInfo()" value="确定选择">&nbsp;&nbsp;
  <input type="button" value="关闭弹层" onClick="closeShowBox()">
</span></div>
<hr>
<div id="shop_box" style="height:400px;overflow:auto"></div>
</div>
<script type="text/javascript" src="/fuman/js/report.js"></script>
<script type="text/javascript">
	function paixu(colnum,ordertype){
		var orderstr=colnum+"__"+ordertype;
		var current_url="?platform="+getPar("platform")+"&search_sku="+getPar("search_sku")+"&selltype="+getPar("selltype")+
						"&orderstr="+orderstr;
		this.location.href=current_url;
			
	}	
	function getPar(par){
		//获取当前URL
		var local_url = document.location.href; 
		//获取要取得的get参数位置
		var get = local_url.indexOf(par +"=");
		if(get == -1){
			return '';   
		}   
		//截取字符串
		var get_par = local_url.slice(par.length + get + 1);    
		//判断截取后的字符串是否还有其他get参数
		var nextPar = get_par.indexOf("&");
		if(nextPar != -1){
			get_par = get_par.slice(0, nextPar);
		}
		return get_par;
	}
</script>
</body>
</html>